/*    */ package com.feeyin.radar.sys.controller;
/*    */ 
/*    */ import com.feeyin.radar.sys.service.DataDictionaryService;
/*    */ import com.feeyin.radar.sys.service.RepeatCustomerSetService;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.web.servlet.ModelAndView;
/*    */ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
/*    */ import org.springframework.web.servlet.view.RedirectView;
/*    */ 
/*    */ public class RepeatCustomerSetController extends MultiActionController
/*    */ {
/*    */   private RepeatCustomerSetService repeatCustomerSetService;
/*    */   private DataDictionaryService dataDictionaryService;
/*    */   private String repeatCustomerSet;
/*    */ 
/*    */   public RepeatCustomerSetService getRepeatCustomerSetService()
/*    */   {
/* 29 */     return this.repeatCustomerSetService;
/*    */   }
/*    */ 
/*    */   public void setRepeatCustomerSetService(RepeatCustomerSetService repeatCustomerSetService)
/*    */   {
/* 34 */     this.repeatCustomerSetService = repeatCustomerSetService;
/*    */   }
/*    */ 
/*    */   public DataDictionaryService getDataDictionaryService() {
/* 38 */     return this.dataDictionaryService;
/*    */   }
/*    */ 
/*    */   public void setDataDictionaryService(DataDictionaryService dataDictionaryService) {
/* 42 */     this.dataDictionaryService = dataDictionaryService;
/*    */   }
/*    */ 
/*    */   public String getRepeatCustomerSet() {
/* 46 */     return this.repeatCustomerSet;
/*    */   }
/*    */ 
/*    */   public void setRepeatCustomerSet(String repeatCustomerSet) {
/* 50 */     this.repeatCustomerSet = repeatCustomerSet;
/*    */   }
/*    */ 
/*    */   public ModelAndView display(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/* 55 */     Map map = new HashMap();
/* 56 */     map.put("result", request.getParameter("result"));
/* 57 */     map.put("records", this.dataDictionaryService.getCustomerDictionarys());
/* 58 */     map.put("repeatSet", this.repeatCustomerSetService.getRepeatCustomerSets());
/*    */ 
/* 60 */     return new ModelAndView(getRepeatCustomerSet(), map);
/*    */   }
/*    */ 
/*    */   public ModelAndView saveRepeatCustomerSet(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/* 65 */     boolean result = false;
/* 66 */     int success = 0;
/* 67 */     String id = request.getParameter("id");
/* 68 */     String isRepeat = request.getParameter("isRepeat");
/* 69 */     String[] recordIds = request.getParameterValues("recordId");
/* 70 */     result = this.repeatCustomerSetService.insertRepeatCustomerSet(id, isRepeat, recordIds);
/* 71 */     if (result) success = 1;
/* 72 */     return new ModelAndView(new RedirectView("./repeatCustomerSet.do?action=display&result=" + success));
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.controller.RepeatCustomerSetController
 * JD-Core Version:    0.6.0
 */